<%@ page import="com.portico.dept.solarch.ProjectQuality" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <g:set var="entityName" value="${message(code: 'projectQuality.label', default: 'ProjectQuality')}"/>
  %{--<title><g:message code="default.list.label" args="[entityName]" /></title>--}%
</head>
<body>
%{--<div class="nav">--}%
%{--<span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>--}%
%{--<span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>--}%
%{--</div>--}%
<div class="body">
  <h1><g:message code="default.list.label" args="[entityName]"/></h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <div class="list">
    <table>
      <thead>
      <tr>

        <g:sortableColumn property="id" title="${message(code: 'projectQuality.project.name.label', default: 'Project Name')}"/>

        <g:sortableColumn property="buildName" title="${message(code: 'projectQuality.buildName.label', default: 'Build Name')}"/>

        <g:sortableColumn property="issueStatus" title="${message(code: 'projectQuality.issueStatus.label', default: 'Issue Status')}"/>

        <g:sortableColumn property="type" title="${message(code: 'projectQuality.type.label', default: 'Type')}"/>

        <g:sortableColumn property="subType" title="${message(code: 'projectQuality.subType.label', default: 'Sub Type')}"/>
        <g:sortableColumn property="createDate" title="Created On"/>

        <g:sortableColumn property="blockerCount" title="Blockers"/>
        <g:sortableColumn property="criticalCount" title="Criticals"/>
        <g:sortableColumn property="majorCount" title="Majors"/>
        <g:sortableColumn property="minorCount" title="Minors"/>
        <g:sortableColumn property="trivialCount" title="Trivial"/>

      </tr>
      </thead>
      <tbody>
      <g:each in="${projectQualityInstanceList}" status="i" var="projectQualityInstance">
        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

          <td><g:link action="show" id="${projectQualityInstance.id}">${fieldValue(bean: projectQualityInstance, field: "project.name")}</g:link></td>
          <td>${fieldValue(bean: projectQualityInstance, field: "buildName")}</td>
          <td>${fieldValue(bean: projectQualityInstance, field: "issueStatus")}</td>
          <td>${fieldValue(bean: projectQualityInstance, field: "type")}</td>
          <td>${fieldValue(bean: projectQualityInstance, field: "subType")}</td>
          <td>${fieldValue(bean: projectQualityInstance, field: "createdOn")}</td>

          <td>${fieldValue(bean: projectQualityInstance, field: "blockerCount")}</td>
          <td>${fieldValue(bean: projectQualityInstance, field: "criticalCount")}</td>
          <td>${fieldValue(bean: projectQualityInstance, field: "majorCount")}</td>
          <td>${fieldValue(bean: projectQualityInstance, field: "minorCount")}</td>
          <td>${fieldValue(bean: projectQualityInstance, field: "trivialCount")}</td>

        </tr>
      </g:each>
      </tbody>
    </table>
  </div>
  <div class="paginateButtons">
    <g:paginate total="${projectQualityInstanceTotal}"/>
  </div>
</div>
</body>
</html>
